﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WinAppBasics
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        private CKunde kunde1;
        
        private void button1_Click(object sender, EventArgs e)
        {
            kunde1 = new CKunde(); //Objekt erzeugen

            kunde1.anrede = "herr";
            kunde1.name = "Müller";
            kunde1.plz = 12345;
            kunde1.ort = "Berlin";
            kunde1.stammkunde = true;
        }

        private void button2_Click(object sender, EventArgs e) {
            label1.Text = kunde1.adresse();
            kunde1.addGuthaben(50M);
            label2.Text = "Guthaben ist: " + kunde1.guthaben.ToString("C");
        }

        private void label2_Click(object sender, EventArgs e) {

        }
    }
}
